package io.renren.modules.app.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@ConfigurationProperties(prefix = "wxpay")
@Component
public class WxPayConfig {

    /**
     * appid
     */
    private  String appid = "wx144bb114a62e6283";

    /**
     * 微信支付的商户id
     */
    private  String mch_id = "1517558311";

    /**
     * 微信支付的商户密钥
     */
    private  String key = "e4d0a228557f582597f7d3248d61c620";

    /**
     * 支付成功后的服务器回调url,即微信服务器给服务器发送的支付结果通知
     */

    private String notify_url = "http://ct9vuy.natappfree.cc/check-car/app/wxNotify/";
    /**
     * 授权成功后的服务器回调url,即微信服务器给服务器发送的支付结果通知
     */
    private String REDIRECT_URI = "xwnnj3.natappfree.cc/check-car/app/wxlogin";
    /**
     * 签名方式
     */
    private String SIGNTYPE = "MD5";

    /**
     * 交易类型,小程序JSAPI--小程序支付统一下单接口trade_type的传参，
     * 更多参考：
     * https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=9_1
     * https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=4_2
     */
    private String TRADETYPE = "JSAPI";

    /**
     * 微信统一下单接口地址
     * 更多参考：
     * https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=9_1
     */
    private String pay_url = "https://api.mch.weixin.qq.com/sandboxnew/pay/unifiedorder";

    private String createOrderURL = "https://api.mch.weixin.qq.com/sandboxnew/secapi/pay/refund";

    //公众号密钥密钥
    private String secret;

    private String grant_type;


    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }

    public String getMch_id() {
        return mch_id;
    }

    public void setMch_id(String mch_id) {
        this.mch_id = mch_id;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getNotify_url() {
        return notify_url;
    }

    public void setNotify_url(String notify_url) {
        this.notify_url = notify_url;
    }

    public String getREDIRECT_URI() {
        return REDIRECT_URI;
    }

    public void setREDIRECT_URI(String REDIRECT_URI) {
        this.REDIRECT_URI = REDIRECT_URI;
    }

    public String getSIGNTYPE() {
        return SIGNTYPE;
    }

    public void setSIGNTYPE(String SIGNTYPE) {
        this.SIGNTYPE = SIGNTYPE;
    }

    public String getTRADETYPE() {
        return TRADETYPE;
    }

    public void setTRADETYPE(String TRADETYPE) {
        this.TRADETYPE = TRADETYPE;
    }

    public String getPay_url() {
        return pay_url;
    }

    public void setPay_url(String pay_url) {
        this.pay_url = pay_url;
    }

    public String getCreateOrderURL() {
        return createOrderURL;
    }

    public void setCreateOrderURL(String createOrderURL) {
        this.createOrderURL = createOrderURL;
    }

    public String getSecret() {
        return secret;
    }

    public void setSecret(String secret) {
        this.secret = secret;
    }

    public String getGrant_type() {
        return grant_type;
    }

    public void setGrant_type(String grant_type) {
        this.grant_type = grant_type;
    }
}
